import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as uploadActions from '../redux/actions/upload';
import UploadView from '../views/UploadView';

function mapStateToProps(state) {
    const { uploadData } = state;
    return {
        uploadData
    }
}

function mapDispatchToProps(dispatch) {
    const actions = { ...uploadActions };
    return {
        actions: bindActionCreators(actions, dispatch)
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(UploadView);